import instance from '@/utils/request.js'

export const getPlantList = (params) => {
  return instance({
    url: '/plant/list',
    method: 'get',
    params,
  })
}
export const editPlant = ( data) => {

  return instance({
    url: '/plant',
    method: 'put',
    data,
  })
}

export const deletePlant = (id) => {
  return instance({
    url: `/plant/${id}`,
    method: 'delete',
  })
}

export const addPlant = (data) => {
  return instance({
    url: '/plant',
    method: 'post',
    data,
  })
}
